<%@ page  contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="page" uri="http://www.forten.org/taglib/page"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="forten" uri="http://www.forten.org/taglib/forten"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- CSS -->
<link type="text/css" rel="stylesheet" href="../styles/css/reset.css">
<link type="text/css" rel="stylesheet" href="../styles/css/index.css">
<script type="text/javascript" src="../scripts/html5.js"></script>
<!-- end -->
<script type="text/javascript" src="../scripts/jquery-1.6.min.js"></script>
<title>上传干部信息</title>
</head>

<script type="text/javascript">
function doSubmit(){
	var frm = document.frm;
	if(checkFile()){
		$('#upload span').text('上传中...');
		frm.submit();
		
	}
}

function checkFile(){
	var frm = document.frm;
	var excelFile = frm.excelFile.value;
	var exObj = frm.excelFile;
	var typeRole = ".xls,.xlsx";
	if(excelFile=="" || excelFile==null){
		alert("请选择导入的excel文件！");
		return false;
	}else{
		var excelFile_temp = excelFile.substr(excelFile.lastIndexOf(".")).toLowerCase();
		if(typeRole.indexOf(excelFile_temp)==-1){
			alert("请选择.xls或.xlsx格式的文档！");
			return false;
		}
	}	

	return true;
}	
</script>

<body>
<header>
	<div class="headerWrap"></div>
	</header>

 <div class="content">

		<section> 
   <div class="rc_info mt20">
			<h3>
				<span class="r_title_ico"></span> 干部信息文档导入
			</h3>
		</div>
  <form action="uploadData.jspx" enctype="multipart/form-data" method="post" name="frm" id="frm" >
  <div class="rc_fbt">
				<p class="left">
   <input type="file" name="excelFile"  size="50"/>
                </p>
                <p class="left">
   <a href="#" class="btn2 mt7 ml10 left" onclick="doSubmit();" id="upload"><span >上传</span></a>
                </p> 
  
  </div>
  </form>
  <div class="rc_info mt20">
			<h3>
				<span class="r_title_ico"></span> <a href="../downloads/cadreinfo.xls" >数据导入模板下载</a>
			</h3>
  </div>
  
  </section>
 </div> 
  
<%@include file="/common/foot.jsp"%>